<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>添加员工</title>
</head>
<body>
<h1>添加员工</h1>
<% if (request.getAttribute("error") != null) { %>
<p style="color: red;"><%= request.getAttribute("error") %></p>
<% } %>
<form action="employee" method="post">
    <input type="hidden" name="action" value="add">

    <label for="empId">员工ID:</label>
    <input type="text" id="empId" name="empId" required><br><br>

    <label for="name">姓名:</label>
    <input type="text" id="name" name="name" required><br><br>

    <label for="gender">性别:</label>
    <input type="text" id="gender" name="gender" required><br><br>

    <label for="nation">民族:</label>
    <input type="text" id="nation" name="nation" required><br><br>

    <label for="birthplace">出生地:</label>
    <input type="text" id="birthplace" name="birthplace" required><br><br>

    <label for="birthday">出生日期:</label>
    <input type="date" id="birthday" name="birthday" required><br><br>

    <label for="email">邮箱:</label>
    <input type="email" id="email" name="email" required><br><br>

    <label for="phone">电话:</label>
    <input type="text" id="phone" name="phone" required><br><br>

    <label for="address">地址:</label>
    <input type="text" id="address" name="address" required><br><br>

    <label for="deptId">部门ID:</label>
    <input type="number" id="deptId" name="deptId" required><br><br>

    <label for="position">职位:</label>
    <input type="text" id="position" name="position" required><br><br>

    <label for="salary">薪资:</label>
    <input type="number" step="0.01" id="salary" name="salary" required><br><br>

    <label for="education">学历:</label>
    <input type="text" id="education" name="education" required><br><br>

    <label for="graduateSchool">毕业院校:</label>
    <input type="text" id="graduateSchool" name="graduateSchool" required><br><br>

    <label for="hireDate">入职日期:</label>
    <input type="date" id="hireDate" name="hireDate" required><br><br>

    <label for="status">状态:</label>
    <input type="text" id="status" name="status" required><br><br>

    <label for="contractId">合同ID:</label>
    <input type="text" id="contractId" name="contractId" required><br><br>

    <label for="regularDate">转正日期:</label>
    <input type="date" id="regularDate" name="regularDate"><br><br>

    <label for="leaveDate">离职日期:</label>
    <input type="date" id="leaveDate" name="leaveDate"><br><br>
    <input type="submit" value="添加员工">
</form>
<a href="employee?action=list">返回员工列表</a>
</body>
</html>